home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
libs
/
knowhow4
/
akitdemo.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1994-10-10
|
2KB
|
77 lines
#include "akitdemo.h"
Demo::Demo(int num) : ApplicationKit(1)
{
object_number = num;
if(!init_KNOW_HOW())
return;
static char* LIST1[] = { "1. one", "2. two", "" };
static char* LIST[] = { "1. one", "2. two", "3. three", "4. four",
"5. five", "6. six", "7. seven", "8. eight",
"9. nine", "" };
m1 = new BlockMenu(rect(0, 0, 20, 7), "",
"Block Menu", 6,
"12", LIST1, rect(0, 24, 79, 25), STRING_STATUS,
LIST1, NULL, MOVE | RESIZE,
SHOW_BORDER, SHOW_BORDER, 11, 14, 13, 16);
m2 = new BlockMenu(rect(12, 8, 58, 22), "",
"Block Menu", 6,
"123456789", LIST, rect(0, 24, 79, 25), STRING_STATUS,
LIST, NULL, MOVE | RESIZE,
SHOW_BORDER, SHOW_BORDER, 11, 14, 13, 16);
m3 = new BlockMenu(rect(14, 6, 56, 24), "",
"Block Menu", 6,
"123456789", LIST, rect(0, 24, 79, 25), STRING_STATUS,
LIST, NULL, MOVE | RESIZE,
SHOW_BORDER, SHOW_BORDER, 11, 14, 13, 16);
w = new Window(rect(0, 0, 60, 24), "", "",
0, NO_BORDER, NO_BORDER, 0, 0, 0);
background(w);
add(m1);
add(m2);
add(m3);
assign(m2, m1, AC_MENU1);
w->set_ret(RET_REMOVE | RET_STACKED);
m1->set_ret(RET_REMOVE | RET_STACKED | RET_CANCEL);
m2->set_ret(RET_REMOVE | RET_STACKED | RET_CANCEL);
m3->set_ret(RET_REMOVE | RET_STACKED);//RET_CANCEL | RET_OK | RET_MOUSE);
set_ret(RET_REMOVE | RET_STACKED);
}
///////////////////////
void Demo::show()
{
WindowManager::show_window(w);
WindowManager::show_window(m1);
moveTo(1);
}
///////////////////////
int application(int ) { return 0; }
///////////////////////
int Demo::application(int n)
{
switch(n)
{
case AC_MENU1:
return 2;
default:
return 2;
}
}
///////////////////////
void main()
{
Demo* kit = new Demo(0);
kit->show();
kit->exe();
delete kit;
close_KNOW_HOW();
closegraph();
}